#include "adddevice.h"
#include "ui_adddevice.h"

addDevice::addDevice(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::addDevice)
{
    ui->setupUi(this);
}

addDevice::~addDevice()
{
    delete ui;
}

void addDevice::on_pushButton_clicked()
{
    //发设信号  emit
    QString item = ui->comboBox->currentText();
    QString name = ui->lineEdit->text();
    QString location = ui->comboBox_2->currentText();
    QString ip = ui->lineEdit_2->text();
    QString remark = ui->lineEdit_3->text();

    emit sendDeviceInfo(item,name,location,ip,remark);
    //单击提交按钮返回主窗口，并且需要将文本框数据传递给主窗口
    this->close();
}
